package com.kitchen.ui.deco
{
	import flash.display.Sprite;
	import flash.geom.Rectangle;
	
	internal class DecoContainer extends Sprite
	{
		public var w:int;
		public var h:int;
		
		protected var decos:Array;
		protected var decod:Array;
		protected var prange:Rectangle;
		protected var pid:int;
		protected var bg:BackGround;
		
		public function DecoContainer(w:int, h:int)
		{
			super();
			this.w = w;
			this.h = h;
			this.decos = new Array();
		}
		
		/**
		 * 添加饰品
		 **/
		public function append(deco:Object):void{
			
		}
		
		/**
		 * 设置编辑状态
		 **/
		public function setEdit(isEdited:Boolean):void{
			for each(var dc:DecoItem in this.decos){
				dc.setEdit(true);
			}
		}
		
		/**
		 * 获取编辑后的数据
		 **/
		public function getEditData():Array{
			var tmpArray:Array = new Array();
			for each(var dc:DecoItem in this.decos){
				if(dc.data.edit == 1){
					tmpArray.push(dc.data);
				}
			}
			return tmpArray;
		}
	}
}